<?
/* The BCMath library (available when PHP is compiled with ``--enable-bcmath``)
    provides arbitrary integer arithmetic functions. The ones that would matter
    are bcmul() and bcsub(). */

function factorial($n) {
    if ($n == 1) {
        return 1;
    }
    else {
        return $n * factorial($n - 1);
    }
}


print factorial($argv[1]);
print "\n";
?>
